C: WinAPI CreateDIBitmap() from byte[] problem

Posted by zipcodeman on Stack Overflow See other posts from Stack Overflow or by zipcodeman
Published on 2010-03-26T01:43:13Z Indexed on 2010/03/26 2:03 UTC
Read the original article Hit count: 1042

Filed under:
|
|
|
|

I have been working on this problem for a while now.
I am trying to add JPEG support to a program with libjpeg.
For the most part, it is working fairly well, But for some JPEGs, they show up like the picture on the left.

It may not be obvious, but the background shows up with alternating red green and blue rows. If anyone has seen this behavior before and knows a probable cause, I would appreciate any input.

I have padded the rows to be multiples of four bytes, and it only slightly helped the issue.

© Stack Overflow or respective owner

Related posts about libjpeg

Related posts about c